{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">新增供应商报价 [ <a href="__APP__/Ask_supplier/edit/id/{$_REQUEST.asid}">返回采购询价单</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/insert/" class="form">
<table cellpadding=3 cellspacing=3 >
<tr>
    <td class="tRight" width="150px">供应商：</td>
    <td class="tLeft" >
        <div class="input-append">
            <!--暂用offerid代替supplierid-->
            {$_REQUEST.supplier_id|getModelName='Supplier'}
            {$_GET.offerid|getModelName='Supplier'}
                <input id="supplier" name="supplier_id" class="input-xlarge search-query"
                <notempty name='_REQUEST.supplier_id'>value="{$_REQUEST.supplier_id}"<else/><notempty name="_GET.offerid">value="{$_GET.offerid}"</notempty> </notempty>
                 
                 <notempty name='_REQUEST.supplier_id'>value="{$_REQUEST.supplier_id}"<else/><notempty name="_GET.offerid">value="{$_GET.offerid}"</notempty> </notempty>  >
            </div>
            <a class="btn" href="__APP__/Supplier/add/return/Ask_supplier_detail/rid/{$_REQUEST.asid}"><i class="icon-user"></i>新增供应商</a>
        </td>
</tr>
<tr>
    <td>询价时间：</td>
    <td><input type="text" class="span2" name="create_time" value="{:toDate(time())}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"> </td>
</tr>
    <tr>
    <td class="tRight" >产品：</td>
    <td class="tLeft" >
            <input type="hidden" name="jumpUrl" value="__APP__/Ask_supplier/edit/id/{$_REQUEST.asid}">
            <input type="hidden" name="ask_supplier_id" value="{$_REQUEST.asid}">
            <input type="hidden" name="product_id" value="{$_REQUEST.asid|getModelName='Ask_supplier','product_id'}">
        {$_REQUEST.asid|getModelName='Ask_supplier','product_id'|getModelName='Product'}
        <span class="offset1">{$_REQUEST.asid|getModelName='Ask_supplier','product_id'|getPename}</span>
        <span class="offset1">{$_REQUEST.asid|getModelName='Ask_supplier','product_id'|getCas}</span>
        </td>
    </tr>
<notempty name="_GET.offerid">
        <tr>
            <td>业务报价意见</td>
            <td>{$_GET.offerid||getModelName='Ask_supplier_detail','sale_consult'|getConfigVal="sale_consult"}</td>
        </tr>
</notempty>
<tr>
    <td>备注</td><!--暂时把规格做为备注使用-->
    <td><textarea name="specification"  class="input-xxlarge" rows="5"></textarea> </td>
</tr>
<tr>
	<td class="tRight">报价：</td>
        <td class="tLeft">
            格式要求：<span>纯度 99.5％ ；液体；6.1类危险品 ；性质稳定 ； <br/>                                 100g：3000/100g， 1周；1kg：8000/ kg 30天; 开票价，不开票-10% ，或者不开票价重新列举</span>
            <textarea class="span12" name="offer" rows="3"><notempty name="_GET.offerid">{$_GET.offerid|getModelName='Ask_supplier_detail','offer'}</notempty></textarea>
            <input type="hidden" name='create_time' value={:time()}>
        </td>
</tr>

<tr>
    <td class="tRight" >经办人：</td>
    <td class="tLeft" >{:modList('User')}</td>
</tr>
<tr>
	<td></td>
	<td class="center" width="300">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 创建</button>
	<a class="btn btn-primary offset1" href="javascript:history.back()"><i class="icon-arrow-left icon-white"></i>返回</a>
	</td>
</tr>
</table>
</form>
</div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
<script type="text/javascript">
    function filterSupplier(){ 
        if ($('#cq').val() != "") {
            window.open(APP+'/Supplier/search?form=form1&field=cq&keywords='+$('#cq').val(),'selected','directorys=no,toolbar=no,status=no,menubar=no,resizable=yes,width=1000,height=800,top=100,left=120,scrollbars=yes');
        }else
            window.open(APP+'/Supplier/search?form=form1&field=cq','selected','directorys=no,toolbar=no,status=no,menubar=no,resizable=yes,width=1000,height=800,top=100,left=120,scrollbars=yes');
    }
</script>